Problem Note 39408: SPDE data sets unexpectedly locked or not available
ERROR: The file is already locked by another user.
The trace messages revealed that the "file is already locked" message results when two or more SAS processes attempt to create a new metadata file with the same temporary name in the same SPDE library.
Explanation
When SPDE creates a new metadata file, it first creates it with a temporary, or preliminary name. If the temporary name is already in use and cannot be opened, the number being used as the file name is incremented, and SPDE tries again. Once an available file name is found, the new data set is created. When the metadata file has been populated and is closed, the file is renamed to its permanent name.
The trace messages around the error show the source of the trouble as being contention around a temporary metadata file name. The message reporting that the file is already locked by another user indicates that a file with that name already exists in the directory, and that it is open and in use.
This is a case in which improved error reporting by the IO sub-system in version 9.2 has had the unfortunate side effect of adding confusion to an otherwise successful process. This issue didn't occur in 9.1 because the IO sub-system did not report all errors encountered. It now does a better job of reporting problems. However, it is now reporting an error in a situation that in fact, is not an error, but an anticipated occurrence. When SPDE can't get access to a given temporary file name, it just changes the name and tries again, and continues doing so until it finds a name it can use.
Impact of messages
The "file is already locked" errors are harmless. The engine is attempting to open a new file, but has anticipated that the file name may already be in use, and has made provisions to keep trying if that occurs. This is a case in which failing to open a file is an acceptable outcome, and the engine simply works around the problem. The trouble is that the IO sub-system does NOT know that the failed open is acceptable, and reports an error.
Workaround
NONE, messages are not indicating an error.
Please note: SAS 9.3 and the Hotfix on SAS 9.2, reduce the frequency of the messages, but do not completely eliminate them.
Operating System and Release Information
SAS System | N/A | z/OS | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft® Windows® for x64 | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 9.2 TS2M0 | 9.3 TS1M0 |
Windows Vista | 9.2 TS2M0 | 9.3 TS1M0 |
64-bit Enabled AIX | 9.2 TS2M0 | 9.3 TS1M0 |
64-bit Enabled HP-UX | 9.2 TS2M0 | 9.3 TS1M0 |
64-bit Enabled Solaris | 9.2 TS2M0 | 9.3 TS1M0 |
HP-UX | 9.2 TS2M0 | 9.3 TS1M0 |
HP-UX IPF | 9.2 TS2M0 | 9.3 TS1M0 |
Linux | 9.2 TS2M0 | 9.3 TS1M0 |
Linux for x64 | 9.2 TS2M0 | 9.3 TS1M0 |
Linux on Itanium | 9.2 TS2M0 | 9.3 TS1M0 |
OpenVMS on HP Integrity | 9.2 TS2M0 | 9.3 TS1M0 |
Solaris for x64 | 9.2 TS2M0 | 9.3 TS1M0 |
Tru64 UNIX | 9.2 TS2M0 | 9.3 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
ERROR: The file is already locked by another user.
Type: | Problem Note |
Priority: | medium |
Topic: | Data Management ==> Data Sources ==> SPDE (Scalable Performance Data Engine)
|
Date Modified: | 2013-02-06 14:03:10 |
Date Created: | 2010-04-21 17:27:32 |